package com.andreamerla.petslife.manager;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import com.google.android.gms.maps.model.LatLng;

/**
 * Created by IntelliJ IDEA.
 * User: a.merla
 * Date: 23/07/13
 * Time: 12.00
 */
public class NavigationManager {
    public static void startNavigationTo(Context context, LatLng latLng) {
        startNavigationTo(context, latLng.latitude, latLng.longitude);
    }

    public static void startNavigationTo(Context context, double latitude, double longitude) {
        String coordString = latitude + ", " + longitude;

        // Start navigation activity
        Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + coordString));
        context.startActivity(i);
    }
}
